// 用户相关请求模块
import request from '@/utils/request'

export const getResourceList = (data:any) => {
  return request({
    method: 'POST',
    url: '/boss/resource/getResourcePages',
    data: data
  })
}

export const getCategoryAll = () => {
  return request({
    method: 'GET',
    url: '/boss/resource/category/getAll'
  })
}

export const saveOrUpdateResource = (data:any) => {
  return request({
    method: 'POST',
    url: '/boss/resource/saveOrUpdate',
    data
  })
}

export const deleteResource = (id:number) => {
  return request({
    method: 'DELETE',
    url: `/boss/resource/${id}`
  })
}

export const deleteCategory = (id:number) => {
  return request({
    method: 'DELETE',
    url: `/boss/resource/category/${id}`
  })
}

export const saveOrderUpdate = (data:any) => {
  return request({
    method: 'POST',
    url: '/boss/resource/category/saveOrderUpdate',
    data
  })
}
